<template>
	<view>
		<view class="pa-12 bg-color-item ptb-12 br-12" v-if="list.length">
			<!-- <view class="mb-12 flex flex-js-sb"  v-for="item in list" :key="item.key">
				<text class="font-color-minor">{{item.label}}</text>
				<text class="flex-1 text-right">{{item.value}}</text>
				<w-icon class='ml-4' name="copy-dark" v-if="item.key=='user_hash'" @click='copy'></w-icon>
			</view> -->
			<view class="font-size-14 flex flex-js-sb flex-ai-center" v-for="item in list" :key="item.key">
				<text class="font-color-999">{{ item.label}}</text>
				<text class="flex-1 text-right font-color-textPrimary">{{item.value}}</text>
				<!-- <w-icon class='ml-4' name="copy-dark" v-if="item.key=='user_hash'" @click='copy'></w-icon> -->
				<!-- v-if="item.key=='user_hash'" -->
			</view>
		</view>
	</view>
</template>

<script>
	import product from '../../mixins/product';
	export default {
		name: "w-product-info-list",
		props: {
			info: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		computed: {
			list() {
				let map = {
					series_name: "所属专辑",
					user_hash: "合约地址",
					// rz_code: '认证标识',
					// nickname:"拥有者"
				}
				return Object.keys(this.info).map(k => {
					return {
						label: map[k]&&this.handleLang(map[k]),
						key: k,
						value: k!=='rz_code'? this.info[k]&&this.handleLang(this.info[k]):this.info[k]
					}
				}).filter(v => v.label && v.value)
			}
		},
		data() {
			return {

			};
		},
		methods: {
			copy() {
				this.$tools.copyText(this.info.real_hash)
			}
		}
	}
</script>

<style lang="scss">

</style>